<h1>Retrieve API Key</h1>
<% if current_user.api_key.nil? or current_user.api_key.empty? %>
  You don't currently have an api key.
  <% form_tag(:controller => 'users', :action => 'api_key') do %>
    <%= submit_tag(" Generate an API Key ", :class => "input-button") %>
  <% end %>
<% else %>
  <p>API Key:</p>
  <p><%=current_user.api_key%></p>
  <p>If your api has been compromised you can generate a new one.  Note that the old one will no longer work.</p>
  <% form_tag(:controller => 'users', :action => 'api_key') do %>
    <%= submit_tag(" Generate a new API Key ", :class => "input-button") %>
  <% end %>
<% end %>
